package com.example.demo.controller;

import com.example.demo.entity.Record;
import com.example.demo.service.RecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
public class RecordController {

    @Autowired
    RecordService recordService;

    @GetMapping("/record")
    public List<Record> select(){
        System.out.println("*****************************************");
        return recordService.select();
    }

}
